#ifndef _APDU_H_
#define _APDU_H_

#include "error.h"

typedef struct apdu_ask {
    unsigned char 	Cla;
    unsigned char 	Ins;
    unsigned char 	P1;
    unsigned char 	P2;
    unsigned char	Len;
    unsigned char 	Data[255];
    unsigned char 	Le;
}ApduAsk;

typedef struct apdu_ack {
    unsigned char	Data[255];
    unsigned char 	Len;
    unsigned int 	Sw12;
}ApduAck;


struct apdu_interface {
    int (*Exchange)(const ApduAsk *ask, ApduAck *ack, Error *err);
};

extern struct apdu_interface moduleApdu;

void ApduModuleInit(int (*Exchange)(const ApduAsk *ask, ApduAck *ack, Error *err));

#endif
